<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html>
<html lang="zh-CN">
	<head>
    <title>管理入口-用户信息列表</title>
    
    <%@ include file="../common.jsp" %>
	<script type="text/javascript" src="${path }/static/vender/jquery/jquery.pagination.js"></script>

  </head>

  <body>
	<jsp:include page="${pagePath }/header.jsp">
		<jsp:param value="2" name="active"/>
	</jsp:include>
  	
    <div class="container-fluid">
      <div class="row">
      	<div class="col-sm-3 col-md-2 sidebar">
			<jsp:include page="left_navbar.jsp">
				<jsp:param value="1" name="active"/>
			</jsp:include>
		</div>
		
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
          <h3 class="page-header">设备列表  </h3>

          <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>#</th>
                  <th>设备编号</th>
                  <th>设备名称</th>
                  <th>设备版本</th>
                  <th>经度</th>
                  <th>纬度</th>
                  <th>地址</th>
                  <th>备注</th>
                  <th>探针MAC列表</th>
                  <th>最后更新时间</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
             	<c:forEach var="dev" varStatus="idx" items="${devices }">
             		<tr>
	                  <td>${idx.index+1 }</td>
	                  <td>${dev.devNo }</td>
	                  <td>${dev.devName }</td>
	                  <td>${dev.devVersion }</td>
	                  <td>${dev.longitude }</td>
	                  <td>${dev.latitude }</td>
	                  <td>${dev.addr }</td>
	                  <td>${dev.remark }</td>
	                  <td>${dev.macList }</td>
           			  <td><fmt:formatDate type="both" value="${dev.lastActiveTime }" /></td>
	                  <td><a href="http://${dev.remoteIp }/" target="_blank">修改配置</a></td>
					</tr>
             	</c:forEach>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
    
	<form action="list" id="queryForm" method="post" style="display: none"></form>
	
	<jsp:include page="${pagePath }/paginator.jsp">
		<jsp:param name="form" value="#queryForm" />
	</jsp:include>
	
	<jsp:include page="${pagePath }/footer.jsp"></jsp:include>

	<script type="text/javascript">
		var currentUserId;
		
	</script>
	<script type="text/javascript" src="${path }/static/js/device/list.js"></script>
</body></html>